﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no, maximum-scale=1.0" />
    <title>信息查询</title>
    <link rel="stylesheet" type="text/css" href="/css/common.css" />
    <link rel="stylesheet" type="text/css" href="/css/index.css" />
</head>

<body class="bg_ef">
    <div class="container">
        <div class="header">
            <div class="headbg">
                <a href="/page/equipment.html" class="return"></a>
            </div>
            <p>特种设备</p>
        </div>
        <main>
            <div class="list-box">
                <div class="list_name">
                    <span>基本情况</span>
                </div>
                <ul class="list-item">
                    <li><p>单位名称 <span id="UseUnitArchiveForEquipmentName"></span></p></li>
                    <li><p>使用证编号 <span id="UseCerCode"></span></p></li>
                    <li><p>出厂编号 <span id="ProCode"></span></p></li>
                    <li><p>安全管理人员<span id="SafManPerson"></span></p></li>
                    <li><p>安管人员手机<span id="SafManCellphone"></span></p></li>
                    <li><p>安管人员电话<span id="SafManTelephone"></span></p></li>
                    <li><p>设备操作人员<span id="EquOptPerson"></span></p></li>
                    <li><p>操作人员手机<span id="EquOptPerTelephone"></span></p></li>
                    <li><p>操作人员电话<span id="EquOptPerCellphone"></span></p></li>
                </ul>
            </div>
            <div class="list-box">
                <div class="list_name">
                    <span>维保信息</span>
                </div>
                <ul class="list-item">
                    <li><p>维保单位 <span id="MaintainUnitArchiveName"></span></p></li>
                    <li><p>维保人员 <span id="MaintainUserName"></span></p></li>
                    <li><p>维保电话 <span id="MaintainTel"></span></p></li>
                    <li><p>维保日期 <span id="MaintainDate"></span></p></li>
                    <li><p>检查情况 <span id="CheckContentStr"></span></p></li>
                </ul>
                </div>
                <div class="list-box">
                    <div class="list_name">
                        <span>公示信息</span>
                    </div>
                    <ul class="list-item">
                        <li><span style="background-color: rgb(240, 115, 115);">问</span> <span id="PublicProgramDescribeStr"></span></li>
                    </ul>
                    </div>

</main>
    </div>
</body>

</html>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<script src="/static/usi/core.js"></script>
<script src="/static/usi/tools.js"></script>
<script>
    window.onload = function () {
        var unid = jQuery.usi.core.getURLParam("Unid");
        jQuery.usi.core.get(ip + api + "/GeEquipmentArchiveByUnid", { unid: unid }, false, function (data) {

            //设备基本信息
            if (data.data.equipmentArchive == null) {
                $("#UseUnitArchiveForEquipmentName").html("未知");
                $("#UseCerCode").html("未知");
                $("#ProCode").html("未知");
                $("#SafManPerson").html("未知");
                $("#SafManCellphone").html("未知");
                $("#SafManTelephone").html("未知");
                $("#EquOptPerson").html("未知");
                $("#EquOptPerTelephone").html("未知");
                $("#EquOptPerCellphone").html("未知");
            }
            else {
                var name = "未知";
                if (!jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.useUnitArchiveForEquipment))
                    name = data.data.equipmentArchive.useUnitArchiveForEquipment.name
                else if (!jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.maintainUnitArchiveForEquipment))
                    name = data.data.equipmentArchive.maintainUnitArchiveForEquipment.name
                $("#UseUnitArchiveForEquipmentName").html(name);
                $("#UseCerCode").html(jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.useCerCode) ? "未知" : data.data.equipmentArchive.useCerCode);
                $("#ProCode").html(jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.proCode) ? "未知" : data.data.equipmentArchive.proCode);
                $("#SafManPerson").html(jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.safManPerson) ? "未知" : data.data.equipmentArchive.safManPerson);
                $("#SafManCellphone").html(jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.safManCellphone) ? "未知" : data.data.equipmentArchive.safManCellphone);
                $("#SafManTelephone").html(jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.safManTelephone) ? "未知" : data.data.equipmentArchive.safManTelephone);
                $("#EquOptPerson").html(jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.equOptPerson) ? "未知" : data.data.equipmentArchive.equOptPerson);
                $("#EquOptPerTelephone").html(jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.equOptPerTelephone) ? "未知" : data.data.equipmentArchive.equOptPerTelephone);
                $("#EquOptPerCellphone").html(jQuery.usi.core.isNullOrEmpty(data.data.equipmentArchive.equOptPerCellphone) ? "未知" : data.data.equipmentArchive.equOptPerCellphone);
            }

            //维保信息
            if (data.data.maintainRecord == null) {
                $("#MaintainUnitArchiveName").html("未知");
                $("#MaintainUserName").html("未知");
                $("#MaintainTel").html("未知");
                $("#MaintainDate").html("未知");
                $("#CheckContentStr").html("未知");
            }
            else {
                $("#MaintainUnitArchiveName").html(data.data.maintainRecord.equipmentArchive.maintainUnitArchiveForEquipment.name);
                $("#MaintainUserName").html(jQuery.usi.core.isNullOrEmpty(data.data.maintainRecord.maintainUserName) ? "未知" : data.data.maintainRecord.maintainUserName);
                $("#MaintainTel").html(jQuery.usi.core.isNullOrEmpty(data.data.maintainRecord.maintainTel) ? "未知" : data.data.maintainRecord.maintainTel);
                $("#MaintainDate").html(jQuery.usi.core.isNullOrEmpty(data.data.maintainRecord.maintainDate) ? "未知" : jQuery.usi.core.formatDate(data.data.maintainRecord.maintainDate, "yyyy年MM月dd日"));
                $("#CheckContentStr").html(jQuery.usi.core.isNullOrEmpty(data.data.maintainRecord.checkContentStr) ? "未知" : data.data.maintainRecord.checkContentStr);
            }

            //公示信息
            if (data.data.checkMain == null) {
                $("#PublicProgramDescribeStr").html("未知");
            }
            else {
                $("#PublicProgramDescribeStr").html(jQuery.usi.core.isNullOrEmpty(data.data.checkMain.publicProgramDescribeStr) ? "无" : data.data.checkMain.publicProgramDescribeStr);
            }
        });
    }

</script>